

<?php

// $did=$_GET["did"];
 $did='12341234423242332432';
//$line=$_GET["line"];
//$line='1234';
$address="192.168.3.36";
$port=8001;
		$master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)
            or die("socket_create() failed");
        socket_connect($master, $address, $port)
            or die("socket_connect() failed");

		$cmdstr="cmd".$did.$line;
		socket_write($master,$cmdstr."\n")
        	or die("socket_write failed");


	socket_close($master);
	echo "1";




 /*

$did="SIMCOM_SIM900A867330029442756";

$line="0136";
echo $did;
echo $line;

$address="hommer.vicp.io";
$port=8001;
		$master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)
            or die("socket_create() failed");
        socket_connect($master, $address, $port)
            or die("socket_connect() failed");

		$cmdstr="cmd".$did.$line;
		if(!socket_write($master,$cmdstr."\n"))
        {
         echo "write failed";
        }


	socket_close($master);
	echo "<br>"."end";
*/
?>
